<template>
  <div>
    <!-- <my-card title="待办"> -->
    <div class="list-wrapper">
      <!-- v-if="isAuth('user:doctors:update:authStatus')" -->
      <template v-for="(item, index) in info.todoTaskList">
        <div
          class="item"
          @click="
            toPage({
              name: 'workOrderManage/buildProject',
              params: {
                orderStatus: buildReportKeys[item.orderStatus].orderStatus
              }
            })
          "
        >
          <div class="num">{{ item.quantity }}</div>
          <div class="section-part">
            <div>{{ buildReportKeys[item.orderStatus].label }}</div>
            <div>
              <span class="data-red">{{ item.expireTaskCount || 0 }}</span
              >超时
            </div>
          </div>
        </div>
      </template>
      <div class="item" @click="toPage({ name: 'workOrderHang/buildReport' })">
        <div class="num">{{ info.hangNum }}</div>
        <div class="section-part">
          <div>建设项目工单挂起</div>
        </div>
      </div>
    </div>
  </div>
  <!-- </my-card> -->
</template>
<script>
import { buildReportKeys } from "./option.js";
export default {
  props: {
    info: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      buildReportKeys
    };
  },
  methods: {
    toPage(path) {
      //  console.log({...path})
      this.$router.push({ ...path });
    }
  }
};
</script>
<style lang="scss" scoped>
.list-wrapper {
  display: flex;
  flex-wrap: wrap;
  .item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: 0 0px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
    border: 1px solid #ebeef5;
    padding: 15px;
    min-width: 150px;
    margin: 5px 15px 15px 1px;
    .num {
      cursor: pointer;
      font-size: 20px;
      font-weight: bold;
      color: #1898fa;
    }
    .section-part {
      display: flex;
      justify-content: space-between;
      .data-red {
        color: red;
      }
    }
  }
}
</style>